package com.AnimalTest;

public abstract class Animal {
    String name;
    int age;

    public Animal() {
    }

    public Animal(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    //现在我需要一个方法能够描述对象吃的行为：
    public abstract void eat();

    public String toString(){
        return "name:"+name+" age:"+age;
    }
}
